const toString = Object.prototype.toString;

export const is = (val: unknown, type: string) => {
  return toString.call(val) === `[object ${type}]`;
};

export const isNumber = (val: unknown): val is number => {
  return is(val, "Number");
};
